package com.mbc.hr.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

@SuppressWarnings("serial")
@Entity
@Table(name="HR_LeaveBalance")
@NamedQueries({
	@NamedQuery(name="LeaveBalance.findAll",query="SELECT lb FROM LeaveBalance lb"),
	@NamedQuery(name="LeaveBalance.findByEmployeeIdLeaveTypeYear",query="SELECT lb FROM LeaveBalance lb WHERE lb.employeeID = :employeeID AND lb.leaveTypeID = :leaveTypeID AND lb.year = :year"),
	@NamedQuery(name="LeaveBalance.findByLeaveTypeID",query="SELECT lb FROM LeaveBalance lb WHERE lb.leaveTypeID = :leaveTypeID"),
	@NamedQuery(name="LeaveBalance.findByEmployeeIdYear",query="SELECT lb FROM LeaveBalance lb WHERE lb.employeeID = :employeeID AND lb.year = :year"),
	@NamedQuery(name="LeaveBalance.deleteByEmployeeIdLeaveTypeYear",query="DELETE FROM LeaveBalance lb WHERE lb.employeeID = :employeeID AND lb.leaveTypeID = :leaveTypeID AND lb.year = :year")
	
})
public class LeaveBalance implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long autokey;
	private Long employeeID;
	private long leaveTypeID;
	private int year;
	private int maximum;
	private Integer total;
	
	@Transient
	private String leaveDescription;

	public String getLeaveDescription() {
		return leaveDescription;
	}

	public void setLeaveDescription(String leaveDescription) {
		this.leaveDescription = leaveDescription;
	}
	
	public Long getEmployeeID(){
		return employeeID;
	}

	public void setEmployeeID(Long employeeID){
		this.employeeID = employeeID;
	}

	public Integer getTotal(){
		return total;
	}

	public void setTotal(Integer total){
		this.total = total;
	}

	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getMaximum() {
		return maximum;
	}

	public void setMaximum(int maximum) {
		this.maximum = maximum;
	}

	public long getAutokey() {
		return autokey;
	}

	public void setAutokey(long autokey) {
		this.autokey = autokey;
	}

	public long getLeaveTypeID() {
		return leaveTypeID;
	}

	public void setLeaveTypeID(long leaveTypeID) {
		this.leaveTypeID = leaveTypeID;
	}


}
